package com.wteam.PoJo.VO;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

@Data
@AllArgsConstructor
@NoArgsConstructor

public class shopingvo {
    @NotNull(message = "成本不能为空")
    @ApiModelProperty(value = "成本", required = true)
    private Double cost;

    @NotEmpty(message = "商品名称不能为空")
    @ApiModelProperty(value = "商品名称(商品描述txt)", required = true)
    private String goodsName;

    @NotEmpty(message = "商品详情不能为空")
    @ApiModelProperty(value = "商品详情", required = true)
    private String intro;

    @NotNull(message = "价格不能为空")
    @ApiModelProperty(value = "价格", required = true)
    private Double price;

    @NotNull
    @ApiModelProperty(value = "库存", required = true)
    private Integer quantity;

    @NotNull
    @ApiModelProperty(value = "商品类型(传类型id)", required = true)
    private Integer goodsType;

    @NotEmpty
    @ApiModelProperty(value = "小图片", required = true)
    private String small;

//    @NotEmpty
//    @ApiModelProperty(value = "下架原因", required = true)
//    private String UnderMessage;

    @NotNull
    @ApiModelProperty(value = "商品重量", required = true)
    private Double weight;

    @ApiModelProperty(value = "商品编号", required = false)
    private String sn;

    @ApiModelProperty(value = "上架情况？1：上架 |2：下架 ", required = false)
    private String MarketEnable;

    @ApiModelProperty(value = "商品类型", required = false)
    @TableField(exist = false)//这个字段在表中不存在
    private String typeName;


    @ApiModelProperty(required = false)
    private Integer id;

    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty(required = false)
    private String CreateBy;

    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty(required = false)
    private LocalDateTime CreateTime;

    @ApiModelProperty(required = false)
    @TableLogic(value = "2", delval = "1")
    private Boolean DeleteFlag;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty(required = false)
    private String UpdateBy;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty(required = false)
    private LocalDateTime UpdateTime;
}
